<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="UTF-8" />
        <link rel="stylesheet" href="styles/style.css">
        <link rel="stylesheet" href="styles/theme/atom-one-dark.css">
        <title>例子26-ES6/7常用语法介绍</title>
    </head>

    <body>
        <pre>
            <code>
                // 例子26

                for (let index of ['a', 'b'].keys()) {
                    console.log(index);
                }
                // 0
                // 1

                for (let elem of ['a', 'b'].values()) {
                    console.log(elem);
                }
                // 'a'
                // 'b'

                for (let [index, elem] of ['a', 'b'].entries()) {
                    console.log(index, elem);
                }
                // 0 "a"
                // 1 "b"
            </code>
        </pre>
        <script src="scripts/libs/highlight.pack.js"></script>
        <script src="scripts/26.js"></script>
        <script>
            hljs.initHighlightingOnLoad();
        </script>
    </body>

</html>